package com.ruoyi.lvlian.service;

import java.util.HashMap;
import java.util.List;

import com.ruoyi.lvlian.domain.*;
import com.ruoyi.lvlian.dto.*;
import com.ruoyi.lvlian.vo.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * 发票信息Service接口
 *
 * @author liyuxi
 * @date 2024-05-09
 */
public interface InvoiceInfoService {
    /**
     * 查询发票信息
     *
     * @param id 发票信息主键
     * @return 发票信息
     */
    public InvoiceVo selectInvoiceInfoById(String id);

    /**
     * 查询发票信息列表
     *
     * @param invoiceInfo 发票信息
     * @return 发票信息集合
     */
    public List<InvoiceVo> selectInvoiceInfoList(InvoiceInfoDto invoiceInfo);

    /**
     * 新增发票信息
     *
     * @param invoiceInfo 发票信息
     * @return 结果
     */
    public int insertInvoiceInfo(InvoiceInfo invoiceInfo) throws Exception;

    /**
     * 修改发票信息
     *
     * @param invoiceInfo 发票信息
     * @return 结果
     */
    public int updateInvoiceInfo(InvoiceInfo invoiceInfo);

    /**
     * 批量删除发票信息
     *
     * @param ids 需要删除的发票信息主键集合
     * @return 结果
     */
    public int deleteInvoiceInfoByIds(String[] ids);

    /**
     * 删除发票信息信息
     *
     * @param id 发票信息主键
     * @return 结果
     */
    public int deleteInvoiceInfoById(String id);

    /**
     * 查询发票信息详情
     *
     * @param invoiceInfo
     * @return
     */
    List<PaymentInfoVo> details(InvoiceInfoDto invoiceInfo);


    List<PaymentInfoVo> queryInvoicePaymentInfoRefList(String invoiceId);

    //    int addInvoicePaymentUseAmountList(List<InvoiceInfoPaymentRefDto> invoiceInfoPaymentRefDto);
/*    List<WarehouseInfo> queryInvoiceRecyclingRefList(String invoiceId);
    List<WarehouseInfo> queryInvoiceRenewableInInfoRefList(String invoiceId);

    List<WarehouseInfo> queryRenewableInInfoJoinContractList(RenewableInInfoDto renewableInInfoDto);*/


    int deleteInvoicePaymentUseAmountList(String invoiceId, String paymentId);


    int batchSaveWarehouse(List<InvoiceWarehouseRef> dtoList);


    int batchSavePaymentRef(List<InvoiceInfoPaymentRef> dtoList);

    List<InvoiceInfoPaymentRef> importInfoPurchasePayment(MultipartFile file, String sheetName, int rowNum) throws Exception;


    List<InvoiceVo> queryInvoiceInfoList(InvoiceInfoDto invoiceInfo);

    List<HashMap<String, Object>> querySettlementAmountByInvoiceNum(String invoiceNum);

    List<HashMap<String, Object>> queryPaymentAmountByInvoiceNum(String invoiceNum);

    List<HashMap<String, Object>> queryContractInfoByInvoiceNum(String invoiceNum);

    int bachSaveDetails(List<InvoiceDetails> dtoList);

    List<InvoiceDetails> importInvoiceDetails(MultipartFile file, String sheetName, int i) throws Exception;

    int bachSave(List<InvoiceInfo> dtoList);

    List<InvoiceInfo> importInfo(MultipartFile file, String sheetName, int rowNum) throws Exception;

    List<InvoiceWarehouseRef> importInfoWarehouse(MultipartFile file, String sheetName, int rowNum) throws Exception;

    List<InvoiceContractRef> importInfoContractRef(MultipartFile file, String sheetName, int rowNum) throws Exception;

    int bachSaveContractRef(List<InvoiceContractRef> dtoList);

    int updateLogisticsStatusByInvoiceNum(InvoiceInfo invoiceInfo);

    DashboardVo queryInvoiceInfoAgg(String category, String warehouseNum, String settlementAmount, String buyerName, String sellerName);
}
